package com.fh.common;/**
 * 描述:
 * Author:袁亚强
 * Date:2021/10/1810:57
 */

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * created by macro on 2021/10/18,
 */
@ControllerAdvice
public class ControllerExceptions {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public yyqData chandlerException(Exception e) {
        return yyqData.error(500, e.getMessage());
    }

}
